package com.shawn.springboot.integeration.system.controller;

import com.shawn.springboot.integeration.common.model.GenericResponse;
import com.shawn.springboot.integeration.system.model.pojo.SysUser;
import com.shawn.springboot.integeration.system.service.ISysUserService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author zhangjian
 * @description: 用户信息控制层
 * @date 2022/9/3
 */
@RestController
@RequestMapping("/system/user")
public class SysUserController {
    @Resource
    private ISysUserService sysUserService;

    @RequiresPermissions("system:user:add")
    @PostMapping("/add")
    public GenericResponse<SysUser> addSave(@RequestBody SysUser user) {
        // 模拟数据库操作
        return GenericResponse.success(user);
    }
}
